<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>体检预约</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport"
	content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">


<link rel="stylesheet" href="css/normalize3.0.2.min.css" />
<link rel="stylesheet" href="css/style.css?v=7" />
<link href="css/mobiscroll.css" rel="stylesheet" />
<link href="css/mobiscroll_date.css" rel="stylesheet" />

<link rel="stylesheet" href="css/mui.css">
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" href="css/weui.css">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="js/utile.js"></script>
<!--  <script type="text/javascript" src="js/jquery.reveal.js"></script> -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<!-- <script src="js/jquery.min.js"></script>  -->
<script src="js/mobiscroll_date.js"></script>
<script src="js/mobiscroll.js"></script>
<script type="text/javascript">
$(function () {
	var currYear = (new Date()).getFullYear();	
	var opt={};
	opt.date = {preset : 'date'};
	opt.datetime = {preset : 'datetime'};
	opt.time = {preset : 'time'};
	opt.default = {
		theme: 'android-ics light', //皮肤样式
		display: 'modal', //显示方式 
		mode: 'scroller', //日期选择模式
		dateFormat: 'yyyy-mm-dd',
		lang: 'zh',
		showNow: true,
		nowText: "今天",
		startYear: currYear - 50, //开始年份
		endYear: currYear + 10 //结束年份
	};

	$("#USER_AGE").mobiscroll($.extend(opt['date'], opt['default']));

});
 
 
        var orderCombo;
        var rootArea;
        var endDate;
        var projectAdvanceNum;
        
    		
var orderType = 1;
$(document).ready(function(){
	
	var type = getQueryStr("type");
	$('.part1').show();
	$('.part2').hide();
	if(type == 2) {
		var url = getURL() + "/mobile/familyOrder";
		orderType = 2;
	} else {
		var url = getURL() + "/mobile/selfOrderInit";
		orderType = 1;
	}
	  var pram = {};
	  $.ajax({
		  type: 'POST',
		  url: url,
		  data: pram,
		  success: function(data){
			  projectAdvanceNum = data.project.advanceNum;
			  if(data.project.isEmailRpt == 1){
				  $('.postTR').show();
			  } else {
				  $('.postTR').hide();
			  }
			  endDate = data.card.endDate;
			 if( FormatDate(new Date()) > endDate){
				 $('.nextBtn').hide();
				 $('.tips').show();
			 } else {
				 $('.nextBtn').show();
				 $('.tips').hide();
				 
			 }
			  orderCombo = data.orderCombo;
			  if(data.rootArea) {
				  rootArea = data.rootArea;
			  }
			  if(data.root) {
				  rootArea = data.root.areaId;
			  }
			  contentList = data.contentList;
			  areaList = data.arealist;
			  if(data.card.notSelfRes == 0 && type != 2){
				  $('.empName').attr({"readonly":'true'});
				  $('.certNo').attr("readonly",'true');
				  $('.certType').attr("disabled",'true');
				  $('input:radio[name=sex]').attr("disabled",'true');
			  } else {
				  $('.empName').removeAttr("readonly");
				  $('.certNo').removeAttr("readonly");
				  $('.certType').removeAttr("disabled");
				  $('input:radio[name=sex]').removeAttr("disabled");
			  }
			  $(".cardNumber").html("卡号Card Number: " + data.card.cardNum);
			  if(data.employee) {
				  $(".empName").val(data.employee.empName);
				  $(".certNo").val(data.employee.certNo);
	// 			  $(".certType").val(data.employee.certType);
	// 			  $(".certTypeText").val($(".certType").find("option:selected").text());
				  $(".certType").val(data.employee.certType);
				  if(data.employee.sex == 0) {
					  $('input:radio[name=sex]')[1].checked = true;
				  } else if(data.employee.sex == 1) {
					  $('input:radio[name=sex]')[0].checked = true;
				  }
				  executeYears();
			  }
			  $('.cityDiv1').hide();
		      $('.cityDiv2').hide();
		      $('.cityDiv3').hide();
			  setPePackages();
			  
			  
		  },
		  dataType: "json"
		});
	
	
	
	
	
  $(".btInp").mousedown(function(){
    $(this).css("border","1px solid #30a5ff");
  });
   $(".btInp").mouseout(function(){
    $(this).css("border","1px solid #c9c9c9");
  });
   
});

function pePackagesChange(){
  cityIndex = 0;
  $(".city0").empty();
  var areaOption = $("<option>").val("-1").text("未选择"); 
  $(".city0").append(areaOption); 
  $('.cityDiv1').hide();
  $('.cityDiv2').hide();
  setCity(rootArea, true);
     
}

function executeYears(){
  		var UUserCard = $(".certNo").val()+"";
  		if($(".certType").val()==1 && UUserCard.length==18){
    		var myDate = new Date(); 
			var month = myDate.getMonth() + 1; 
			var day = myDate.getDate(); 
			var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1; 
			if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) { 
				age++; 
			} 
			$(".age").val(age);
  		}
}

var cityIndex = 0;

function setCity(){
	var rootId = arguments[0] ? arguments[0] : 1;
	  var isRoot = arguments[1] ? arguments[1] : false;
	$(".supp").text("");// 清空数据
	$('.reservString').attr("disabled","disabled");
	 $(".reservString").val("");//
     var flag = false;
     for(var i=0;i<contentList.length;i++) {
   	  	var item = contentList[i];
		  if(item.itemId == $(".pePackages").val()) {
			  for(var j=0;j<areaList[i].length;j++) {
				  var area = areaList[i][j];
				  if((isRoot && area.areaId == rootId) || (!isRoot && area.parent == rootId)) {
					  if(!flag) {
						 $(".city" + cityIndex).empty();
					     $(".cityDiv" + cityIndex).show();
						  var areaOption = $("<option>").val("-1").text("未选择"); 
						  $(".city" + cityIndex).append(areaOption); 
						  flag = true;
					  }
					  var areaOption = $("<option>").val(area.areaId).text(area.areaName); 
					  $(".city" + cityIndex).append(areaOption); 
				  }
			  }
			  if(!flag) {
				  var url = getURL() + "/mobile/getsupp";
				  var pram = {areaId:rootId,itemId:$(".pePackages").val(),orderType:orderType};
				  $.ajax({
					  type: 'POST',
					  url: url,
					  data: pram,
					  success: function(data){
						  
						  supplierList = data.supplierList;
						  for(var i=0;i<data.supplierList.length;i++){
							  var supp = data.supplierList[i];
							  var str = '<div><input name="supp" type="radio" value="'+ supp.suppId +'" class="mlem5" onClick="suppChange()">'+ supp.suppName+'<br/>&nbsp&nbsp&nbsp&nbsp营业时间:' + (supp.shopHours == undefined?"":supp.shopHours)+'<br/>&nbsp&nbsp&nbsp&nbsp地址:' + (supp.adreMian == undefined?"":supp.adreMian)+'<br/>&nbsp&nbsp&nbsp&nbsp乘车路线:' + (supp.route == undefined?"":supp.route) +'</div>';
							  $(".supp").append(str);
						  }
					  },
					  dataType: "json"
					});
			  }
			  return;
		  }
     }
}

/** 休息日期 */
var restDay;

 /** 特殊休息日期【甲子表】 */
var specialRest;


function suppChange(){
	$('.reservString').removeAttr("disabled");
// 	$('.reservString').attr("max", endDate);
	maxDate = endDate;
	if(supplierList) {
		for (i=0;i<supplierList.length;i++){
			var supp = supplierList[i];
			if(supp.suppId == $("input[name='supp']:checked").val()) {
				var url = getURL() + "/user/getSupplierVolume";
				var pram = {suppId:supp.suppId,itemId:$(".pePackages").val()};
			  	$.ajax({
				  type: 'POST',
				  url: url,
				  data: pram,
				  success: function(data){
					  dateVolumes = null;
					if(data.type=="2"){
						dateVolumes = data.volumes;
						if(dateVolumes.length > 0){
							minDate = dateVolumes[0].userDt;
							maxDate = dateVolumes[dateVolumes.length-1].userDt;
						}
					}else if(data.type=="1"){
						
						minDate = data.startDataStr;
						maxDate = data.endDataStr;
						restDay = data.restDay;
						specialRest = data.specialRest;
					}
				  }
			  	});
			  	break;
			}
		}
	}
}

var dateVolumes
var supplierList;

function setPePackages(){
	 $(".pePackages").empty();
		var option = $("<option>").val("-1").text("请选择体检套餐"); 
	  $(".pePackages").append(option); 
	 for(var i=0;i<contentList.length;i++) {
		  var item = contentList[i];
		  if(item.sex == $("input[name='sex']:checked").val() ) {
			  if(item.sex == 0 && item.maritalStatus != $("input[name='marital']:checked").val()) {
				 continue;
			  }
			  var option = $("<option>").val(item.itemId).text(item.itemName); 
			  option.attr("contentDetail",item.contentDetail);
			  $(".pePackages").append(option); 
		  }
	  }
	 pePackagesChange();
}

var contentList;
var areaList ;
function back(){
	window.location.href = "before.html";
}

function gotoDiv(index){
	$('.part1').hide();
	$('.part2').hide();
	$('.part3').hide();
	$('.part' + index).show();
}

function isIdCardNo(num) {
    var factorArr = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1);
    var parityBit = new Array("1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2");
    var varArray = new Array();
    var lngProduct = 0;
    var intCheckDigit;
    var intStrLen = num.length;
    var idNumber = num;
    // initialize
    if ((intStrLen != 15) && (intStrLen != 18)) {
        return false;
    }
    // check and set value
    for (i = 0; i < intStrLen; i++) {
        varArray[i] = idNumber.charAt(i);
        if ((varArray[i] < '0' || varArray[i] > '9') && (i != 17)) {
            return false;
        } else if (i < 17) {
            varArray[i] = varArray[i] * factorArr[i];
        }
    }
    if (intStrLen == 18) {
        //check date
        var date8 = idNumber.substring(6, 14);
        if (isDate8(date8) == false) {
            return false;
        }
        // calculate the sum of the products
        for (i = 0; i < 17; i++) {
            lngProduct = lngProduct + varArray[i];
        }
        // calculate the check digit
        intCheckDigit = parityBit[lngProduct % 11];
        // check last digit
        if (varArray[17] != intCheckDigit) {
            return false;
        }
    }
    else {        //length is 15
        //check date
        var date6 = idNumber.substring(6, 12);
        if (isDate6(date6) == false) {
            return false;
        }
    }
    return true;
}

function isDate6(sDate) {
    if (!/^[0-9]{6}$/.test(sDate)) {
        return false;
    }
    var year, month, day;
    year = sDate.substring(0, 4);
    month = sDate.substring(4, 6);
    if (year < 1700 || year > 2500) return false
    if (month < 1 || month > 12) return false
    return true
}
function isDate8(sDate) {
    if (!/^[0-9]{8}$/.test(sDate)) {
        return false;
    }
    var year, month, day;
    year = sDate.substring(0, 4);
    month = sDate.substring(4, 6);
    day = sDate.substring(6, 8);
    var iaMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    if (year < 1700 || year > 2500) return false
    if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) iaMonthDays[1] = 29;
    if (month < 1 || month > 12) return false
    if (day < 1 || day > iaMonthDays[month - 1]) return false
    return true
}


function checkDiv1(){
	
// 	jQuery.validator.addMethod("isIdCardNo", function (value, element) {
//         return this.optional(element) || isIdCardNo(value);
//     }, "请正确输入您的身份证号码");
    var length = $(".tel").val().length;
    var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
	if(length != 11 || $(".tel").val().match(mobile) == null){
		alert("请正确填写您的手机号码");
		return false;
	}
 
	if(!$('.empName').val()) {
		alert("请填写体检人姓名");
		return false;
	}
	if(!$(".certType").val()) {
		alert("请选择体检人证件类型");
		return false;
	}
	if(!$(".certType").val()) {
		alert("请选择体检人证件类型");
		return false;
	}
	if(!$(".certNo").val()) {
		alert("请填写体检人证件号码");
		return false;
	}
	if($(".certType").val() == "1"){
		if(!isIdCardNo($(".certNo").val())) {
			alert("请填写体正确的身份证号码");
			return false;
		}
	}
	if(!$("input[name='sex']:checked").val()) {
		alert("请选择性别");
		return false;
	}
	if(!$("input[name='marital']:checked").val()) {
		alert("请选择婚姻状态");
		return false;
	}
	if($(".email").val() && $(".email").val().indexOf("@") == -1) {
		alert("请填写正确的邮箱");
		return false;
	}
	if(!$(".tel").val()) {
		alert("请填写手机号");
		return false;
	}
	if($(".tel").val().length != 11 ||$(".tel").val().substr(0,1) != "1") {
		alert("请填写正确的手机号");
		return false;
	}
	if(!$(".age").val()) {
		alert("请填写年龄");
		return false;
	}
	if($(".isPost").val() == 1) {
		if(!$(".postCode").val()) {
			alert("请填邮寄地址邮编");
			return false;
		}
		if($(".postCode").val().length != 6) {
			alert("请填正确的邮寄地址邮编");
			return false;
		}
		if(!$(".address").val()) {
			alert("请填邮寄地址");
			return false;
		}
	}
	return true;
}

var minDate;
var maxDate;

function checkDiv2(){
	if(!$('.pePackages').val() || $('.pePackages').val() == -1) {
		alert("请选择体检套餐");
		return false;
	}
	if(!$("input[name='supp']:checked").val()) {
		alert("请选择体检门店");
		return false;
	}
	if(FormatDate(new Date($(".reservString").val().replace(/-/g,"/"))) == "NaN-NaN-NaN") {
		alert("请选择体检日期");
		return false;
	}
	var strDate = FormatDate(new Date($(".reservString").val().replace(/-/g,"/")));
    
	if((minDate && minDate>strDate) || (maxDate && maxDate<strDate)){
		alert("请不要超出体检日期的范围:" + (minDate?("最小日期:"+minDate):"") + (maxDate?("最大日期:"+maxDate):""));
    	return false;
    }
	return true;
}

function next(){
	if(!checkDiv1()) return;
	setPePackages();
	gotoDiv(2);
}
function previous(){
	gotoDiv(1);
}

function cityChange(index){
	 cityIndex = index + 1;
	 for (var i=index+1;i<4;i++){
		 $(".cityDiv" + i).hide();
	 }
     setCity($(".city" + index).val());
}

var formData;

function review(){
	if(!checkDiv2()) return;
	
	formData = {};
	formData.orderInfo = {};
	formData.orderInfo.empName = $('.empName').val();
	formData.orderInfo.telephone = $('.tel').val();
	formData.orderInfo.email = $('.email').val();
	formData.orderInfo.reservString =  FormatDate(new Date($(".reservString").val().replace(/-/g,"/")));
	if(supplierList) {
		for (i=0;i<supplierList.length;i++){
			var supp = supplierList[i];
			if(supp.suppId == $("input[name='supp']:checked").val()) {
				formData.orderInfo.suppName = supp.suppName;
				formData.orderInfo.suppId = supp.suppId;
				formData.orderInfo.comboId  = supp.email.toString().split(",")[0];
				break;
			}
		}
	}
	formData.orderInfo.itemName = $('.pePackages').find("option:selected").text();
	formData.orderInfo.idenCardNum = $('.certNo').val();
	formData.orderInfo.isMarried = $("input[name='marital']:checked").val();
	formData.orderInfo.sex = $("input[name='sex']:checked").val();
	 $('.part3').load("preview.html", function (response, status, xhr) {
		gotoDiv(3);
		
		$('.part3').text("");
         $('.part3').html(response);
// 		$('.part3').append(response.querySelector("body").innerHTML);
		$(".empName").html(formData.orderInfo.empName);
		$(".telephone").html(formData.orderInfo.telephone);
		$(".email").html(formData.orderInfo.email);
		$(".reservString").html(formData.orderInfo.reservString);
		$(".suppName").html(formData.orderInfo.suppName);
		$(".itemName").html(formData.orderInfo.itemName);
		$(".idenCardNum").html(formData.orderInfo.idenCardNum);
		$(".isMarried").html(formData.orderInfo.isMarried==0?"未婚":"已婚");
		$(".sex").html(formData.orderInfo.sex==0?"女":"男");
		var str = '<div class="pt30 textCent"><a onclick="gotoDiv(2)" class="weui_btn weui_btn_mini weui_btn_plain_blue " style="width: 30%;padding: 5px;">上一步</a> <a onclick="orderSave()" class="weui_btn weui_btn_mini weui_btn_plain_blue" style="width: 30%;padding: 5px; margin-left:20px;">确认预约</a> </div></div>';
		$('.part3').append(str);
     });
// 	getHTML( "preview.html" ).then( function(html) {
// 	});
// 	$(".btnCancleorder").hide();
}

function isPostChange(){
	if($('.isPost').val() == 0){
		$('.postCodeTR').hide()
		$('.addressTR').hide()
		$('.addressTR2').hide()
	} else {
		$('.postCodeTR').show()
		$('.addressTR').show()
		$('.addressTR2').show()
	}
}

function orderSave(){
	var url = getURL() + "/mobile/orderSave";
	  var pram = formData.orderInfo;
	  /** 订单类型 */
	  pram.orderType = orderType;
	  /** 体检人姓名 */
// 	  pram.empName = formData.orderInfo.empName;
	  /** 证件类型【1.身份证2.护照3.军官证4.港澳身份证5.台湾身份证9.其他】 */
	  pram.certType = $(".certType").val();
	  /** 体检人证件号码 */
// 	  pram.idenCardNum = formData.orderInfo.idenCardNum;
	  /** 性别【1：男，2：女】 */
// 	  pram.sex = formData.orderInfo.sex;
	  /** 婚否【0：未婚；1：已婚】 */
// 	  pram.isMarried;
	  /** 手机号码 */
// 	  pram.telephone;
	  /** 年龄 */
	  pram.age = $(".age").val();
	  /** 邮箱 */
// 	  pram.email;
	  /** 邮编 */
	  pram.postalcode = $(".postCode").val();
	  /** 邮寄地址 */
	  pram.postadre = $(".address").val();
	  /** 套餐ID */
	  pram.comboId;
	  /** 内容ID */
	  pram.itemId = $('.pePackages').val();
	  if(orderCombo) {
		  pram.orderComboId = orderCombo.orderComboId;
	  }

	  var str = "?";
	  for ( var p in pram ){ 
		  if ( typeof ( pram [ p ]) == " function " ){ 
		  } else { // p 为属性名称，obj[p]为对应属性的值 
		  	str +=  p + "=" + pram [ p ] + "&"
		  }
	  }
	  str = "";
	  $.ajax({
		  type: 'POST',
		  url: url+str,
		  data: pram ,
		  success: function(data){
			  switch(data){
			  	 case "-1" : 
			  		 alert("预约成功");
			  		window.location.href = "preview.html";
			  		 break;
				 case "0" : 
					 alert("数据被被篡改");
		  		 	 break;
				 case "1":
					 alert("数据错误");
		  			 break;
				 case "2":
					 alert("内容不能为空");
		  		 	 break;
				 case "3":
					 alert("预约时间不能为空");
		  		 break;
				 case "4":
					 alert("体检机构不能为空");
		  		 	 break;
			  }
		  },
		  dataType: "json"
		});
}

function reservStringChange(){
	var date1 = new Date($(".reservString").val().replace(/-/g,"/")); 

	var strDate = FormatDate(new Date($(".reservString").val().replace(/-/g,"/")));
	var strDate2 = FormatDate(new Date($(".reservString").val().replace(/-/g,"-")));
    var year = date1.getFullYear(); 

    var month = date1.getMonth() + 1; 

    var date = date1.getDate();
    
    var day =  date1.getDay();
    $("#volumes").text("");
    if(dateVolumes){
    	var flag = false;
    	for(var i=0;i<dateVolumes.length;i++){
    		if(dateVolumes[i].userDt == strDate2){
    			flag = true;
    			$("#volumes").text("普通剩余个数:"+dateVolumes[i].volume+",VIP剩余个数:"+dateVolumes[i].vIPvolume);
    			break;
    		}
    	}
    	if(!flag){
    		alert("你选择的日期不能预约");
    	}
    } else {
    	
	    if(restDay && restDay.indexOf(day) != -1){
	    	$(".reservString").val("");
	    	alert("所选日期体检机构休息");
	    	return;
	    }
	    if(specialRest && specialRest.indexOf( strDate) != -1){
	    	$(".reservString").val("");
	    	alert("所选日期体检机构休息");
	    	return;
	    }
    }
    

}

function changecombo(obj){
	   var option=$(obj).find("option:checked");
	   var contentDetail=option.attr("contentDetail");
	   $(".modal-body").empty();
	   $(".modal-body").append(contentDetail);
	   
}	

function  showDetail(){
	
}
</script>
</head>

<body>
	<header id="header" class="mui-bar mui-bar-nav">
		<a onclick="history.go(-1)"
			class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
			style="color: #fff;"></a>
		<h1 class="mui-title">体检预约</h1>
	</header>
	<div class="container">

		<div class="part1">
			<div>
				<div class="infTit">体检人员信息 &nbsp;Information</div>
				<p class="tips" style="color: red;">卡不在有效期</p>
				<h5 class="cardNumber">卡号Card Number:</h5>
				<table width="100%" border="0" class="baseTable">
					<tr>
						<td width="45%">体检人姓名 Name:</td>
						<td width="55%"><input name="" type="text" value=""
							class="btInp empName">
						</td>

					</tr>
					<tr>
						<td>体检人证件类型 ID Type:</td>
						<td><select class="weui_select certType" name="select">
								<option value="1">身份证</option>
								<option value="2">护照</option>
								<option value="3">军官证</option>
								<option value="4">港澳身份证</option>
								<option value="5">台湾身份证</option>
								<option value="9">其他</option>
						</select>
						</td>
					</tr>
					<tr>
						<td>体检人证件号码 ID:</td>
						<td><input name="" type="text" value="" class="btInp certNo"
							onchange="executeYears()">
						</td>
					</tr>
					<tr>
						<td><red>*</red>性别 Gender:</td>
						<td><input name="sex" type="radio" value="1">
							&nbsp;男(Male) <input name="sex" type="radio" value="0"
							class="mlem5"> &nbsp;女(Female)</td>
					</tr>
					<tr>
						<td><red>*</red>婚否 Marital status:</td>
						<td><input name="marital" type="radio" value="1">&nbsp;&nbsp;已婚(Married)
							<input name="marital" type="radio" value="0">&nbsp;&nbsp;未婚(Single)
						</td>
					</tr>
					<tr class="emailTR">
						<td>邮箱&nbsp;Email:</td>
						<td><input name="" type="text" value="" class="btInp email">
						</td>
					</tr>
					<tr>
						<td><red>*</red>手机&nbsp;Phone:</td>
						<td><input name="" type="text" value="" class="btInp tel"
							onKeyUp="if(this.value.length>11){this.value=this.value.substr(0,11)};this.value=this.value.replace(/[^\d]/g,'');">
						</td>
					</tr>
					<tr>
						<td><red>*</red>年龄&nbsp;Age:</td>
						<td><input name="" type="text" value="" class="btInp age"
							onKeyUp="if(this.value.length>3){this.value=this.value.substr(0,3)};this.value=this.value.replace(/[^\d]/g,'');">
						</td>
					</tr>
					<tr class="postTR">
						<td>邮寄报告Medical Report:</td>
						<td>

							<div class="weui_cell weui_cell_select weui_select_after">

								<div class="weui_cell_bd weui_cell_primary">
									<select class="weui_select isPost isPost" name="select"
										onChange="isPostChange()">
										<option value="0">否</option>
										<option value="1">是</option>

									</select>
								</div>
							</div></td>
					</tr>
					<tr class="postCodeTR" style="display: none;">
						<td>邮寄地址邮编PostCode:</td>
						<td><input name="" type="text" value=""
							class="btInp postCode"
							onKeyUp="if(this.value.length>6){this.value=this.value.substr(0,6)};this.value=this.value.replace(/[^\d]/g,'');">
						</td>
					</tr>
					<tr class="addressTR" style="display: none;">
						<td>邮寄地址Address:</td>
						<td>&nbsp;</td>
					</tr>
					<tr class="addressTR2" style="display: none;">
						<td colspan="2"><input name="" type="text"
							placeholder="请输入邮寄地址" class="btInp address"0>
						</td>
					</tr>
				</table>

			</div>
			<div class="nextBtn"
				style="width: 60%; text-align: center; margin: 0 auto; padding-top: 20px;">
				<a onclick="next()" class="weui_btn weui_btn_plain_blue">下一步</a>
			</div>
		</div>



		<div class="part2">
			<div>
				<div class="infTit">体检预约信息</div>
				<h5 style="height: 30px; line-height: 25px;">
					体检套餐PE Packages
					<div class="button_sp_area fr">
						<a href="#" data-toggle="modal" data-target="#myModal"
							class="weui_btn weui_btn_mini weui_btn_plain_blue">查看套餐详情</a>
					</div>
				</h5>
				<div class="weui_cell weui_cell_select weui_select_after pt10">
					<div class="weui_cell_bd weui_cell_primary">
						<select class="weui_select pePackages" name="select"
							onChange="pePackagesChange();changecombo(this);">
							<option value="-1">请选择体检套餐</option>
						</select>
					</div>
				</div>
				<h5 class="pt10">体检城市City</h5>
				<div class="weui_cell weui_cell_select weui_select_after cityDiv0"
					style="width: 45%; float: left;">
					<div class="weui_cell_bd weui_cell_primary">
						<select class="weui_select city0" onchange="cityChange(0)">
						</select>
					</div>
				</div>
				<div class="weui_cell weui_cell_select weui_select_after cityDiv1"
					style="width: 45%; float: left;">
					<div class="weui_cell_bd weui_cell_primary">
						<select class="weui_select city1" onchange="cityChange(1)">
						</select>
					</div>
				</div>
				<div class="weui_cell weui_cell_select weui_select_after cityDiv2"
					style="width: 45%; float: left;">
					<div class="weui_cell_bd weui_cell_primary">
						<select class="weui_select city2" onchange="cityChange(2)">
						</select>
					</div>
				</div>
				<div class="weui_cell weui_cell_select weui_select_after cityDiv3"
					style="width: 45%; float: left;">
					<div class="weui_cell_bd weui_cell_primary">
						<select class="weui_select city3" onchange="cityChange(3)">
						</select>
					</div>
				</div>
				<div class="clear"></div>
				<h5 class="pt10">体检门店选择 Choose detail Institution</h5>
				<div
					style="border-bottom: 1px solid #bababa; padding-bottom: 10px; min-height: 200px; max-height: 200px; overflow-y: auto"
					class="supp"></div>
				<h5 class="pt10">体检日期 Physical exaimination Date</h5>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" name="USER_AGE" id="USER_AGE" readonly
						class="weui_input reservString" onChange="reservStringChange()" />
					<!--       <input class="weui_input reservString" type="date" value="" onChange="reservStringChange()"/> -->
				</div>
				<p id="volumes">
				</p>
				<h5 class="pt10">体检温馨提示</h5>
				<p style="color: red;">
					1.请您至少提前7个工作日进行预约，如未预约直接前往体检中心，可能会被体检中心婉拒<br>
					2.请特别留意各体检门店的营业时间，避开休息日预约。为了保证生化项目的准备性，请根据各门店的抽血时间段，尽早前往体检。
				</p>

			</div>
			<div class="pt30 textCent">
				<a onclick="previous()"
					class="weui_btn weui_btn_mini weui_btn_plain_blue "
					style="width: 30%; padding: 5px;">上一步</a> <a onclick="review()"
					class="weui_btn weui_btn_mini weui_btn_plain_blue"
					style="width: 30%; padding: 5px; margin-left: 20px;">提交预览</a>
			</div>
		</div>
		<div class="part3"></div>

	</div>
	<div class="modal fade " id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h6 class="modal-title" style="color: gray" id="myModalLabel">套餐详情
					</h6>
				</div>
				<div class="modal-body" style="overflow: scroll;">
					<p id="contentDetail"></p>
				</div>
			</div>
		</div>
	</div>


</body>
</html>